import logging,HTMLTestRunner_cn,yagmail,pytest
import os.path



class Tools():


   def Log(self):
       log = logging.basicConfig(level=logging.DEBUG,format='%(message)s' ' %(asctime)s' '%(filename)s' '%(levelname)s' '%(lineno)d',filemode='a+',filename='jx.log')
       return log
   def baogao(self):
       baogao1 = HTMLTestRunner_cn.HTMLTestRunner(open('/.A3mall','wd'),title='A3mall.测试报告',description='A3mall.测试报告')

       return baogao1

   def Email(self):
       email = yagmail.SMTP(user='3484055372@qq.com',password='Ngqyabdsctyocigf',host=465,port='stmp.qq.com')
       email.send(to='3484055372@qq.com',contents='A3mall测试报告',subject='A3mall测试报告')
       email.close()



if __name__ == '__main__':
    pytest.main()